package com.jingan.nursinghome.regulatory.http

import android.app.Activity
import android.util.Log
import cn.android.support.v7.lib.sin.crown.base.BaseListenner
import cn.android.support.v7.lib.sin.crown.kotlin.https.Https
import com.jingan.nursinghome.regulatory.model.Qfinfo

/**
 * Created by 彭治铭 on 2018/6/13.
 */
object KotlinHttp {
    //获取巡检信息
    fun qfinfo(oid: String?, starttime: String?, endtime: String?, stname: String?, activity: Activity?, callback: BaseListenner<ArrayList<Qfinfo>>) {
        Https(Http.getInstance().urlqfinfo, activity).addParam("oid", oid).addParam("starttime", starttime).addParam("endtime", endtime).addParam("stname", stname)
                .showLoad(true).cacle(true).onSuccess {
                    Log.e("test","巡检信息数据:\t"+it)
                }.showParams(true)
                .Post(ArrayList<Qfinfo>()) {
                    callback.onResult(it)
                }
//
//        Https(Http.getInstance().urlqfinfo, activity)
//                .showLoad(true).cacle(true).onSuccess {
//                    Log.e("test","巡检信息数据:\t"+it)
//                }.showParams(true)
//                .Post(ArrayList<Qfinfo>()) {
//                    callback.onResult(it)
//                }
    }
}